Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added unit tests (in branch riak_core_3) #8

Open
wants to merge 4 commits into
base: riak_core_3
Choose a base branch
from

Conversation

pmenhart
Copy link

@pmenhart pmenhart commented Jun 6, 2018

This could be useful for your readers: ExUnit now starts several slave nodes in a cluster (configured in config/test.exs). Ping, key/value, and coverage commands are executed.
I also fixed a bug in CoverageFsm, and added a new coverage command NoSlides.Service.clear() to remove all keys from the store.
A few remarks about running this project on Elixir 1.6.5 with Erlang 20.3.6 are in the Readme.

pmenhart added 2 commits June 6, 2018 18:04
* Test with several slave nodes in a cluster (configured in config/test.exs).
  To prevent running RiakCore on the master node (harmless, but clutters the logs),
  invoke with `mix test --no-start`
* Fixed a few warnings
* Updated riak_core.schema

Notes:
* Running this project on Elixir 1.6.5 with Erlang 20.3.6.
  I had to comment out "warnings_as_errors"
  in `deps/riak_ensemble/rebar.config` and in `deps/riak_core/rebar.config`
* This project uses riak_core_ng v3.0.9.
  Later riak_core_ng commits introduced gen_fsm_compat, which fails
  with newer Elixir+rebar3 because of "missing erl_vsn" issue:
  rebar_erl_vsn is a pre-compile hook in rebar.config of gen_fsm_compat
  and few other projects.
  Error seems to be caused by Mix not handling rebar3 hooks properly.
  See elixir-lang/elixir#7733
  and Kyorai/riak_core#23

  This issue is not specific to erl_vsn:
  for example, the forked https://github.com/gpad/cuttlefish (see mix.exs)
  differs from the official version only by rebar.config commenting out:
     % {provider_hooks, [{post, [{compile, {default, escriptize}}]}]}.
* riak_core_coverage_fsm in riak_core_ng expects additional value from init
* added coverage command NoSlides.Service.clear() to remove all keys
* Added unit test for all coverage commands
@pmenhart pmenhart force-pushed the riak_core_3 branch 4 times, most recently from ab42a9d to 4dbed8a Compare June 7, 2018 03:18
* See README for explanation why failing with Erlang/OTP 20
@pmenhart pmenhart force-pushed the riak_core_3 branch 2 times, most recently from 078abf2 to 8b8a847 Compare June 8, 2018 19:45
@ghost
Copy link

ghost commented Jul 11, 2018

Ooh that's cool. Nice work. @pmenhart gotta try this stuff out.

* This version uses gen_fsm_compat
* Fixed rebar3 version 3.6.0 or above is needed to avoid problems
  compiling riak_ensemble and riak_core.
  'mix local.rebar --force' will upgrade rebar3 for your Mix projects
@pmenhart
Copy link
Author

The latest commit works with riak_core_ng v3.1.1. Newer rebar3 is needed to avoid problems with gen_fsm_compat "missing erl_vsn". You can upgrade by running

mix local.rebar --force

@ghost
Copy link

ghost commented Jul 13, 2018

Nice pull request - interesting approach to booting tests +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant